<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"   
 "http://www.w3.org/TR/html4/loose.dtd">
<html style="height:100%">
<head><#include "/base/head.html">
<meta charset="UTF-8">
</head>

<body style="height:100%">
    <div class="easyui-layout" style="width:100%;height:100%;">
        <div data-options="region:'north'" >
        	<div style="height:50px; font-size:30px;font-weight:bold; float: left;">宠物犬疾病专家系统</div>
        	<div style="float: right;margin-top: 30px;">${user.nickname} 你好  &nbsp;  <a href="${contextPath}/login/out">退出登录</a><span class="icon-redo" >&nbsp;&nbsp;</span></div>
        </div>
        <div data-options="region:'south',split:true" style="height:50px; text-align:center; line-height:40px;">copy right</div>
        <div data-options="region:'west',split:true" title="菜单" style="width:200px; ">
	        <div class="easyui-panel" style="padding:5px; height:100%;">
	            <ul id="menu_tree" class="easyui-tree" data-options="url:'sys/getMenus',method:'get',animate:true"></ul>
	        </div>	
        </div>

        <script type="text/javascript">
	        $('#menu_tree').tree({
	        	onClick: function(node){

	        		var tab = $("#content_tabs").tabs('getTab', node.text);

	        		if(tab == null) {
		        		var t = $('#content_tabs').tabs('add',{
		        			title: node.text,
		        			selected: true,
		        			href : node.url,
		        			closable:true,
		        		});
						console.log(t);
		        	}else {
		        		$("#content_tabs").tabs("select", node.text);
		        	}
	        	}
	        });
        </script>

        <div data-options="region:'center',title:''"  >
	        <div id="content_tabs" class="easyui-tabs" style="width:100%;height:100%;" data-options="justified:true">
	            <div title="Tab1" data-options="href:'user/user_manager.html'">

	            </div>
	            <div title="Tab2" data-options="closable:true" style="overflow:auto;padding:20px;">
	                tab2
	            </div>
	            <div title="Tab3" data-options="iconCls:'icon-reload',closable:true" >
	                tab3
	            </div>
	        </div>
        </div>

    </div>

</body> 
</html>
